package com.witte.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.witte.entity.Service;
import com.witte.entity.Statitic;

@Mapper
public interface ServiceMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Service record);

    int insertSelective(Service record);

    Service selectByPrimaryKey(Integer id);
    
    List<Service> selectByState(@Param("state")String state,
    		@Param("beginPage") Integer beginPage,@Param("pageSize") Integer pageSize);

    int getRecodeCount(@Param("state")String state);
    
    int updateByPrimaryKeySelective(Service record);

    int updateByPrimaryKey(Service record);
    
    public List<Service> search(String content);
    
    //the amount of Creators
    int countByCreator();
    
    //the amount of state
    int countBystate();
    
    //the amount of type
    List<Statitic> countByType();
}